package com.ybkj.o2o.zhuanche.service.impl;

import com.ybkj.o2o.zhuanche.entity.PassengerComplaints;
import com.ybkj.o2o.zhuanche.mapper.PassengerComplaintsMapper;
import com.ybkj.o2o.zhuanche.service.PassengerComplaintsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by Administrator on 2017/3/8.
 */
@Service
public class DefaultPassengerComplaintsService implements PassengerComplaintsService {

  @Autowired
  private PassengerComplaintsMapper passengerComplaintsMapper;

  @Override
  public int save(PassengerComplaints pc) {
    return passengerComplaintsMapper.insert(pc);
  }

  @Override
  public List<PassengerComplaints> selectByOrderId(Long orderId, String appKey, Integer offset,
      Integer limit) {
    return passengerComplaintsMapper.selectByOrderId(orderId,appKey,offset,limit);
  }

  @Override public long countByOrderId(Long orderId, String appKey) {
    return passengerComplaintsMapper.countByOrderId(orderId,appKey);
  }

  @Override public int deleteById(Long pcId, String appKey) {
    return passengerComplaintsMapper.deleteByIdAndAppKey(pcId,appKey);
  }

  @Override public PassengerComplaints findOne(Long pcId, String appKey) {
    return passengerComplaintsMapper.findOne(pcId,appKey);
  }


}
